class CreateStockSheets < ActiveRecord::Migration
  def change
    create_table :stock_sheets do |t|
      t.string :symbol
      t.float :c01, limit: 53, comment: '流动资产'
      t.float :c02, limit: 53, comment: '流动负债'
      t.float :c03, limit: 53, comment: '现金'
      t.float :c04, limit: 53, comment: '短期借款'
      t.float :c05, limit: 53, comment: '应付票据'
      t.float :c06, limit: 53, comment: '一年到期非流动负债'
      t.float :c07, limit: 53, comment: '一年到期可转换债券'
      t.float :c08, limit: 53, comment: '固定资产'
      t.float :c09, limit: 53, comment: '投资性房地产'
      t.float :c10, limit: 53, comment: '长期股权投资'
      t.float :c11, limit: 53, comment: '资产总计'
      t.float :c12, limit: 53, comment: '可出售金融资产'
      t.float :c13, limit: 53, comment: '持有到期投资'
      t.float :c14, limit: 53, comment: '营业利润'
      t.float :c15, limit: 53, comment: '营业税金'
      t.float :c16, limit: 53, comment: '实收资本'
      t.float :c17, limit: 53, comment: '长期借款'
      t.float :c18, limit: 53, comment: '应付债券'
      t.float :c19, limit: 53, comment: '少数股东权益'
      t.float :c20, limit: 53, comment: '递延所得税'
      t.float :c21, limit: 53, comment: '净利润'
      t.float :c22, limit: 53, comment: '联营投资收益'
      t.float :c23, limit: 53, comment: '存货'

      t.timestamps null: false
    end
    add_index :stock_sheets, :symbol, unique: true
  end
end
